<?php $this->_extends('_layouts/default_layout'); ?>

<?php $this->_block('title'); ?>个人信息设置<?php $this->_endblock(); ?>

<?php $this->_block('contents'); ?>

<?php if(isset($content)): echo $content; else: ?>

<div id="register">
<form action="<?=url("user/setting") ?>" method="POST">
	<span style="font-size: 15px; font-weight: bold; float:left; padding-top: 5px">个人信息设置</span><br />
	<table style="clear:left">
			<tr>
				<td style="width: 6em"><label for="username" >用户名</label></td>
				<td><input disabled="disabled"  autocomplete="off" value="<?php if(isset($row['username'])): echo h($row['username']); endif; ?>" class="textbox" maxlength=32 name="username" id="username" type="text">
				<?=isset($errMsg['username'])?'<div class="err-msg">' . join("<br />", $errMsg['username']) . "</div>":"" ?>
					<span class="description">英文数字或下划线，最长24，如：witpn,  xingxing，不区分大小写</span><br />
					<span style="font-size: 85%; line-height: 2.3em;">个人主页：http://www.witpn.com/people/<span class="url-name"></span></span>
 				</td>
			</tr>
            <tr>
                <td>
                    <label for="nickname">昵称</label>
                </td>
                <td>
                    <input autocomplete="off" value="<?php if(isset($row['nickname'])): echo h($row['nickname']); endif; ?>" class="textbox" maxlength=32 name="nickname" id="nickname" type="text">
                    <?=isset($errMsg['nickname'])? '<div class="err-msg">' . join("<br />", $errMsg['nickname']) . '</div>':"" ?>
                    <span class="description">用于显示，可以为任何字符，默认跟用户名相同</span>
                </td>
            </tr>
 			<tr>
				<td><label for="email" >邮箱地址</label></td>
				<td>
					<input autocomplete="off" value="<?php if(isset($row['email'])): echo h($row['email']); endif; ?>" size="30" class="textbox" name="email" maxlength=40 id="email" type="text">
					<?php if (isset($errMsg['email']) && !empty($errMsg['email'])):  echo "<div class='err-msg'>" . join("<br />", $errMsg['email']) . "</div>"; endif; ?>
					
					<span class="description">例如：witpn@gmail.com, bear@hotmail.com等</span>
 				</td>
			</tr>
			<tr>
 				<td><label for="password">密码</label></td>
				<td><input name="password" id="password" class="textbox" maxlength=40 value="<?php if(isset($row['password'])): echo h($row['password']); endif; ?>" size="26" type="password">
					<?=isset($errMsg['password'])? '<div class="err-msg">'.join("<br />", $errMsg['password']).'</div>':"" ?>
					<span class="description"><span style="color:red">留空则不修改密码；</span>密码区分大小写</span>
				</td>
 			</tr>
			<tr>
 				<td><label for="confirmPassword">再次输入密码</label></td>
 				<td><input name="confirmPassword" id="confirmPassword" class="textbox" maxlength=40 size="26" value="<?php if(isset($row['confirmPassword'])): echo h($row['confirmPassword']); endif; ?>" type="password">
 					<?=isset($errMsg['confirmPassword'])?'<div class="err-msg">'.join("<br />", $errMsg['confirmPassword']).'</div>':"" ?>
 				</td>
 			</tr>
	</table>
 		<br />
		<div class="sbmit">
            <input type="hidden" name="id" value="<?=$row['id']?>" />
			<button style="margin-top:10px;" name="submit" type="submit">提交</button>
		</div>
	
</form>
</div>
<?php endif;?>
<?php $this->_endblock(); ?>

